package com.syz.controller;

import com.syz.service.IStudentService;
import org.springframework.stereotype.Controller;

//<bean name="studentController" class="com.situ.spring.controller.StudentController"/>
@Controller
public class StudentController {
    //private IStudentService studentService = new StudentServiceImpl();
    private IStudentService studentService;

    //DI
    public void setStudentService(IStudentService studentService) {
        this.studentService = studentService;
    }

    public void selectAll() {
        System.out.println("StudentController.selectAll");
        studentService.selectAll();
    }
}
